How to Solve trigonometric equation by factoring